package com.qf.mapper;

import com.qf.entity.Student;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface StudentMapper {
    List<Student> showAllStudentGrade();
    List<Student> showAllStudentSubject();
    List<Student> selectAll();


    Student selectByStuId(Integer stuId);

    //  根据用户的性别、地址、班级编号、用户姓名(模糊)
    List<Student> selectByCondition(Student student);

    int update(Student student);

    int deleteByStuIds(Integer[] stuIds);
    @Select("select * from Student")
    List<Student> selectAllBy();
    @Select("select * from where stuId = #{stuId}")
    Student selectBuId(Integer stuId);
    @Options(useGeneratedKeys = true,keyProperty = "stuId")
@Insert("insert into student values(0,#{stuName},#{stuGender},#{stuPhone},#{bornDate},#{stuEmail},#{stuAddress},1)")
    int insert(Student student);


}
